package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * 类说明：
 * 作者：huangqiuxin on 2016/5/13 16:47
 * 邮箱：648859026@qq.com
 */
public class RegisterStep1Action extends AHttpService<PbBean.PbResUserRegisterStep1>{
    /**
     * 注册步骤1/绑定手机
     * @param context
     * @param mobile 绑定手机
     * @return
     */
    public static RegisterStep1Action newInstance(Context context, String mobile){
        return new RegisterStep1Action(context, mobile);
    }
    private String mobile;
    private RegisterStep1Action(Context context, String mobile) {
        super(context);
        this.mobile = mobile;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqUserRegisterStep1.Builder builder = PbBean.PbReqUserRegisterStep1.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setMobile(mobile);

        return apiService.registerStep1(builder.build());
    }
}
